//
//  UITextView+AWTheme.m
//  changeShin
//
//  Created by Alan Wang on 2019/3/26.
//  Copyright © 2019 Alan Wang. All rights reserved.
//

#import "UITextView+AWTheme.h"
#import "NSObject+AWTheme.h"

@implementation UITextView (AWTheme)
-(void)AWTheme_TextColorForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.textColor = [[AWThemeManager shareInstance] colorForKey:key];
    } forKey:@"textColor"];
}
-(void)AWTheme_KeyboardAppearanceForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.keyboardAppearance = [[AWThemeManager shareInstance] uIntegerForKey:key];
    } forKey:@"keyboardAppearance"];
}
-(void)AWTheme_FontForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.font = [[AWThemeManager shareInstance] fontForKey:key];
    } forKey:@"font"];
}
-(void)AWTheme_BoldFontForKey:(NSString*)key{
    AWweakify(self)
    [self saveBlok:^{
        AWstrongify(self)
        self.font = [[AWThemeManager shareInstance] boldfontForKey:key];
    } forKey:@"boldfont"];
}
@end
